<?php
require_once 'connect.php';

if (isset($_POST) && isset($_POST['username']) && isset($_POST['password'])) {
	$username = $_POST['username'];
	$password = $_POST['password'];
	// if username and password match
	connect();
	$result = login($username, $password);
	if($result) {
		echo 'true';
	}else {
		echo 'Incorrect Username or Password. Please Try Again';
	}
} else {
	echo 'Unable to login';
}
?>